package com.stylefeng.guns.modular.commodity.model;

import java.io.Serializable;

import com.baomidou.mybatisplus.enums.IdType;
import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;

/**
 * <p>
 * 商品表
 * </p>
 *
 * @author BrunoLi123
 * @since 2018-05-12
 */
public class Commodity extends Model<Commodity> {

    private static final long serialVersionUID = 1L;

    /**
     * 商品ID
     */
    @TableId(value = "id")
    private String id;
    /**
     * 商品名称
     */
    private String name;
    /**
     * 商品单价
     */
    private BigDecimal price;
    /**
     * 计量单位
     */
    private Integer unit;
    /**
     * 商品页面url
     */
    private String url;
    /**
     * 商品展示图片url
     */
    @TableField("picture_url")
    private String pictureUrl;
    /**
     * 商品产地
     */
    @TableField("made_in")
    private String madeIn;
    /**
     * 商品描述
     */
    private String description;
    /**
     * 备注
     */
    private String postscript;
    /**
     *  分类ID
     */
    @TableField("sort_id")
    private String sortId;

    /**
     * 是否逻辑删除
     */
    private Integer deleted;
    /**
     * 修改者
     */
    private String modifier;
    /**
     * 修改时间
     */
    @TableField("modify_time")
    private Date modifyTime;
    /**
     * 创建者
     */
    private String creator;
    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public Integer getUnit() {
        return unit;
    }

    public void setUnit(Integer unit) {
        this.unit = unit;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getPictureUrl() {
        return pictureUrl;
    }

    public void setPictureUrl(String pictureUrl) {
        this.pictureUrl = pictureUrl;
    }

    public String getMadeIn() {
        return madeIn;
    }

    public void setMadeIn(String madeIn) {
        this.madeIn = madeIn;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getPostscript() {
        return postscript;
    }

    public void setPostscript(String postscript) {
        this.postscript = postscript;
    }

    public String getSortId(){
        return  sortId;
    }

    public void setSortId(String sortId){
        this.sortId = sortId;
    }

    public Integer getDeleted() {
        return deleted;
    }

    public void setDeleted(Integer deleted) {
        this.deleted = deleted;
    }

    public String getModifier() {
        return modifier;
    }

    public void setModifier(String modifier) {
        this.modifier = modifier;
    }

    public Date getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }

    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Commodity{" +
        "id=" + id +
        ", name=" + name +
        ", price=" + price +
        ", unit=" + unit +
        ", url=" + url +
        ", pictureUrl=" + pictureUrl +
        ", madeIn=" + madeIn +
        ", sortId=" + sortId +
        ", description=" + description +
        ", postscript=" + postscript +
        ", deleted=" + deleted +
        ", modifier=" + modifier +
        ", modifyTime=" + modifyTime +
        ", creator=" + creator +
        ", createTime=" + createTime +
        "}";
    }
}
